import request from '@/utils/request'

export function login(data) {
  return request({
    url: 'auth/logingw',//'auth/login',
    method: 'post',
    data,
    urlType: 2
  })
}

export function register(data) {
  return request({
    url: 'auth/register',
    method: 'post',
    data,
    urlType: 2
  })
}

export function getInfo() {
  return request({
    url: 'auth/info',
    method: 'get',
    urlType: 2
  })
}

export function getCodeImg() {
  return request({
    url: 'auth/code',
    method: 'get',
    urlType: 2
  })
}

export function logout() {
  return request({
    url: 'auth/logout',
    method: 'delete',
    urlType: 2
  })
}

// 获取微信手机号
export function getPhoneNumberRequest(data) {
  return request({
    url: 'interfaceConfiguration/getPhoneNumber',
    method: 'post',
    data,
    urlType: 2
  })
}

// 检查手机号码是否存在
export function checkPhone(data) {
  return request({
    url: 'auth/checkPhone',
    method: 'post',
    data,
    urlType: 2
  })
}

// 获取验证码
export function apiGetCode(data) {
  return request({
    url: 'auth/creatCode',
    method: 'post',
    data,
    urlType: 2
  })
}